from sklearn.cluster import KMeans
import numpy as np
import pandas as pd
x1 = [1,2,3,4,5]
x2 = [5,3,2,7,1]
x = {'0':x1,'1':x2}
X = np.array(pd.DataFrame(x))
print(X)

kmeans = KMeans(n_clusters=2)
kmeans.fit(X)
y_kmeans = kmeans.predict(X)
print(y_kmeans)